﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>考试</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/Jqbox.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="../js/ligerui.min.js" type="text/javascript"></script>
    <script src="../Js/jquery.dialog.js" type="text/javascript"></script>
    <script src="../Js/conmon.js" type="text/javascript"></script>

    <script type="text/javascript">
     var $grid;
     var maiheight = 500;
     var maiwidth = 600;
        var $selectRow = null;
        var vUrl = null;
        $(function () {
            maiheight = $(parent.window).height();
            maiwidth = $(parent.window).width();

            //            $commInfogrid = $("#commInfogrid").ligerGrid({
            //                columns: [
            //               { display: '序号', align: 'left', width: 40, type: 'int', isSort: false,
            //                   render: function (item, i) {
            //                       i = i + 1;
            //                       return i;
            //                   }
            //               },
            //                { display: '标题', name: 'E_Name', align: 'left', width: 80 },
            //                { display: '时间', name: 'E_BeginDate', width: 100 },
            //                 { display: '内容', name: 'E_EndDate', width: 100 }
            //               
            //                ],
            //                dataAction: 'server', pageSize: 20,
            //                url: '../WebServer/MainAdmin.ashx?Action=22',
            //                sortName: 'M_NAME'
            //            

            //            });


            //显示gride
            $grid = $("#maingrid").ligerGrid({
                columns: [
               { display: '序号', align: 'left', width: 40, type: 'int', isSort: false,
                   render: function (item, i) {
                       i = i + 1;
                       return i;
                   }
               },
                { display: '考场', name: 'name', align: 'left', width: 80 },
                { display: '开放考试时间', name: 'begin', width: 100 },
                 { display: '结束考试时间', name: 'end', width: 100 },
                { display: '答题时间', name: 'time', width: 130 },
                { display: '状态', name: 'status', isSort: false, width: 60,
                    render: function (item) {
                        if (item.status == 0) return "正常";
                        else if (item.status == 1) return "停用";

                    }
                },
                 { display: '参加考试', name: 'status', width: 130,
                     render: function (item) {
                         var _html = "停考";
                         if (item.status == 0) {
                             _html = "<a href=\"kaoshi.htm?kc=" + item.id + "\" target=\"_blank\">参加</a>";
                         }
                         
                         return _html;
                     }
                 }

                ],
                dataAction: 'server', pageSize: 20,
                url: '../WebServer/ExamOnline.ashx?Action=examinationList',
                sortName: 'name'


            });
        });

        function loadGrid() {
            if (!$grid) return;
            $("tbody > tr", $grid.gridbody).each(function () {
                $(this).remove();
            });
            $grid.setOptions({  newPage: 1, Rows: [], Total: 0 });   //设置数据参数

            $grid.loadData(true); //加载数据

        }
       
    </script>
      <style type="text/css">
        .edittable td.editcellmessage,.edittable td.editcellverify,.edittable td.editcell{ padding:3px;line-height:23px;}
        .edittable td.editcellmessage{ padding-left:5px;} 
    </style>
</head>
<body>
 【在线考试考场】
  <div id="maingrid"></div>
  <!--
  【公共信息栏】
  <div id="commInfogrid"></div> -->
 

</body>
</html>
